package com.tl.app.service.impl;

import java.util.List;
import com.tl.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tl.app.mapper.AppClerkCommentMapper;
import com.tl.app.domain.AppClerkComment;
import com.tl.app.service.IAppClerkCommentService;

/**
 * 店员评价Service业务层处理
 * 
 * @author suhp
 * @date 2024-07-27
 */
@Service
public class AppClerkCommentServiceImpl implements IAppClerkCommentService 
{
    @Autowired
    private AppClerkCommentMapper appClerkCommentMapper;

    /**
     * 查询店员评价
     * 
     * @param id 店员评价主键
     * @return 店员评价
     */
    @Override
    public AppClerkComment selectAppClerkCommentById(Long id)
    {
        return appClerkCommentMapper.selectAppClerkCommentById(id);
    }

    /**
     * 查询店员评价列表
     * 
     * @param appClerkComment 店员评价
     * @return 店员评价
     */
    @Override
    public List<AppClerkComment> selectAppClerkCommentList(AppClerkComment appClerkComment)
    {
        return appClerkCommentMapper.selectAppClerkCommentList(appClerkComment);
    }

    /**
     * 新增店员评价
     * 
     * @param appClerkComment 店员评价
     * @return 结果
     */
    @Override
    public int insertAppClerkComment(AppClerkComment appClerkComment)
    {
        appClerkComment.setCreateTime(DateUtils.getNowDate());
        return appClerkCommentMapper.insertAppClerkComment(appClerkComment);
    }

    /**
     * 修改店员评价
     * 
     * @param appClerkComment 店员评价
     * @return 结果
     */
    @Override
    public int updateAppClerkComment(AppClerkComment appClerkComment)
    {
        appClerkComment.setUpdateTime(DateUtils.getNowDate());
        return appClerkCommentMapper.updateAppClerkComment(appClerkComment);
    }

    /**
     * 批量删除店员评价
     * 
     * @param ids 需要删除的店员评价主键
     * @return 结果
     */
    @Override
    public int deleteAppClerkCommentByIds(Long[] ids)
    {
        return appClerkCommentMapper.deleteAppClerkCommentByIds(ids);
    }

    /**
     * 删除店员评价信息
     * 
     * @param id 店员评价主键
     * @return 结果
     */
    @Override
    public int deleteAppClerkCommentById(Long id)
    {
        return appClerkCommentMapper.deleteAppClerkCommentById(id);
    }
}
